<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class RecordIntegral extends Model
{

    const TYPE_C=1; //优惠券
    const TYPE_P=2; //商品
    const STATUS_INC=1; //增加
    const STATUS_DEC=2; //扣除

    static public function record($user,$integral,$type,$status)
    {
        RecordIntegral::create([
            'users_id'=>$user,
            'integral'=>$integral,
            'type'=>$type,
            'status'=>$status,
        ]);
    }
}
